/**
 * \file ExtendedCamera.h
 * \author Niels van Galen Last & Erik Kok
 * \date 01-15-08
 */
#ifndef EXTENDED_CAMERA_H
#define EXTENDED_CAMERA_H

#include "ExampleApplication.h"


// Our extended camera class
class ExtendedCamera {
// Attributes ------------------------------------------------------------------------------
	protected:
		SceneNode *mTargetNode; // The camera target
		SceneNode *mCameraNode; // The camera itself
		Camera *mCamera; // Ogre camera

		SceneManager *mSceneMgr;
		String mName;

		bool mOwnCamera; // To know if the ogre camera binded has been created outside or inside of this class

		Real mTightness; // Determines the movement of the camera - 1 means tight movement, while 0 means no movement
	public:
// Methods ---------------------------------------------------------------------------------
	protected:
	public:
		ExtendedCamera (String name, SceneManager *sceneMgr, Camera *camera);
		~ExtendedCamera ();

		void setTightness (Real tightness) { mTightness = tightness; }

		Real getTightness () { return mTightness; }

		Vector3 getCameraPosition () { return mCameraNode->getPosition (); }

		void instantUpdate (Vector3 cameraPosition, Vector3 targetPosition);

		void update (Real elapsedTime, Vector3 cameraPosition, Vector3 targetPosition);
};


#endif
